<?php
namespace Admin\Controller;
use Think\Controller;

class PointMeltingApiController extends CommonController {

    /*
     *进件信息接口
     */
    public function Incoming_information(){
        $loanAppId=$_POST['loanAppId'];//申请借款ID//Long
        $channelId=$_POST['channelId'];//申请借款ID//String
        $personalInfo=$_POST['personalInfo'];//用户基本信息//Object
        $mobileData=$_POST['mobileData'];//手机信息//Object
        $idCard=$_POST['idCard'];//身份证信息///Object
         $data7['result']=true;
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data7;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
    /*
     *贷款状态查询接口(机构提供)
     */
    public function Loan_status_inquiry(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long

    }
    /*
     *签约页面url获取
     */
    public function Signing_get_url(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
        $callBackUrl=$_GET['callBackUrl'];//借款编号//String

        $data['url']='www.baidu.com';///签约页面H5界面地址
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
    /*
     *还款页面url获取
     */
    public function Repayment_get_url(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
        $callBackUrl=$_GET['callBackUrl'];//借款编号//String

        $data['url']='www.baidu.com';///还款页面H5界面地址
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
    /*
    *还款信息接口
    */
    public function Repayment_info(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
    }
    /*
     * 贷款状态推送(猫爸爸提供)
     */
    public function Loan_status_push(){
        $RsaUtil= new \Admin\Service\RsaUtil();//解密类
        $loanAppId=$_GET['loanAppId'];//申请借款编号（猫爸爸进件的时候会以参数形式提供）//Long
        $channelId=$_GET['channelId'];//机构在点融的编号//String
        $status=$_GET['status'];//借款状态 详见：12.4.1//Enum

        $data['result']=empty($status)?true:false;//"result":true/false
        echo '123';
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data;
            //$data1 = $this->jiami($data);
            $this->return = ['data'=>$data];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            //$data1 = $this->jiami($data);
            $this->return = ['data'=>$data];
            return false;
        }
    }
    /*
     *绑卡页面url获取
     */
    public function Tied_card_get_url(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
        $callBackUrl=$_GET['callBackUrl'];//回调地址//String

        $data['url']='www.baidu.com';///提现H5界面地址
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
    /*
     *用户可提现金额查询（机构提供）
     */
    public function User_withdrawal_amount(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
    }
    /*
     *提现页面url获取（机构提供）
     */
    public function User_withdrawal_url(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $channelId=$_GET['channelId'];//渠道ID//String
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
        $callBackUrl=$_GET['callBackUrl'];//回调地址//String

        $data['url']='www.baidu.com';///提现H5界面地址
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
    /*
     * 试算接口（机构提供）
     */
    public function Trial_interface(){
        $RsaUtil= new \Home\Service\RsaUtil();//解密类
        $loanAppId=$_GET['loanAppId'];//借款编号//Long
        $loanAmount=$_GET['loanAmount'];//借款金额//int
        $loanPeriod=$_GET['loanPeriod'];//借款周期//int
        $periodUnit=$_GET['periodUnit'];//借款单位（1：天 2：月（固定使用2））//int

        $data7['chargeBalance']='5000.00';//剩余金额
        $data7['withdrawBalance']='2000.00';//已提现金额
        if(true){
            $data['code']='200';
            $data['msg']='成功';
            $data['data']=$data7;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return true;
        }else{
            $data['code']='500';
            $data['msg']='错误';
            $data['data']=null;
            $data1 = $this->jiami($data);
            $this->return = ['data'=>$data1];
            return false;
        }
    }
}